package com.company;


        public class Main {
            public static void main(String[] args){
                car C = new car();

                C.color="银色";
                Phone P=new Phone();
                P.call();
                P.music();
                P.message();
                P.color="black";
                P.name="小米";
                P.price=1999;
                System.out.println(P.color);
                System.out.println(P.name);
                System.out.println(P.price);
                C.name="奔驰";
                C.price=999999;
                System.out.println(C.color);
                System.out.println(C.name);
                System.out.println(C.price);
                C.ruan();
                C.star();
                C.stop();
            }
        }
        class car{
            String color;//颜色
            double size;//大小
            String name;//名字
            double price;//价格
            public void ruan(){
                System.out.println("正在开车");
            }
            public void star(){
                System.out.println("正在启动");
            }
            public void stop(){
                System.out.println("正在停车");
            }
        }
        class Phone{
            String color;//颜色
            double size;//尺寸
            String name;//名字
            double price;//价格
            public void call(){
                System.out.println("正在打电话");
            }
            public void music(){
                System.out.println("正在听音乐");
            }
            public void message(){
                System.out.println("正在发短信");
            }
        }


